#ifndef __FILE_ZIP_H__
#define __FILE_ZIP_H__

namespace rengine3d {

	class CFileZip: public IFile {
	public:
		CFileZip( void* zipHandle );
		virtual ~CFileZip();

		virtual void Init(void);
		virtual void Shutdown(void);
		virtual string_t GetFileName( void );
		virtual string_t GetFullPath( void );
		virtual bool Exists( const string_t& fileName ) const;
		virtual bool Open( const string_t& fileName, uint mode = fileMode_Read );
		virtual void Close( void ) ;
		virtual uint Read( void *buffer, uint len );
		virtual uint Write( void *buffer, uint len );
		virtual uint Length( void );
		virtual uint Tell( void );
		virtual void Flush( void );
		virtual bool Seek( uint offset, uint origin );
		virtual bool IsOpen( void );
	protected:
		void*		m_zipFile;	// zip handle
		void*		m_zipInfo;	// unzip info
		string_t	m_fileName;
		string_t	m_path;
		bool		m_isOpen;
		int			m_mode;
	};

}

#endif
